package com.zcj.test.hourglassanim.dots;

import android.content.Context;
import android.view.View;

public class AnimatedView extends View {

    private int target;

    public AnimatedView(Context context) {
        super(context);
    }

    public float getXFactor() {
        return getX() / target;
    }

    public float getYFactor() {
        return getY() / target;
    }

    public void setXFactor(float xFactor) {
        setX(target * xFactor);
    }

    public void setYFactor(float yFactor) {
        setY(target * yFactor);
    }

    public void setTarget(int target) {
        this.target = target;
    }

    public int getTarget() {
        return target;
    }
}
